package tims;

import org.junit.Test;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Date;

public class TimeTest {
    @Test
    public void test() {
        new Date();
    }

    @Test
    public void test01() {

        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime dateTime = LocalDateTime.parse("2022-10-19 10:00:00", dateTimeFormatter);
        Date instance = Date.from(dateTime.atZone(ZoneId.systemDefault()).toInstant());
    }
}
